from django.contrib import admin
from palmgo.models import city_manage,area_manage,gps_data,fusion_yc,rh_yc,restart,general

class citymanage_admin(admin.ModelAdmin):
    list_display = ('citycode', 'cityname', 'citypinyin','areacode')
    ordering = ('citycode',)

class areamanage_admin(admin.ModelAdmin):
    list_display = ('areacode', 'areaname', 'areapinyin')
    ordering = ('areacode',)


class gpsdata_admin(admin.ModelAdmin):
    list_display = ('citycode', 'source', 'date','cars','gps_data','repeats','interrupt','interrupt_time')
    ordering = ('date',)

class fusion_yc_admin(admin.ModelAdmin):
    list_display = ('citycode', 'date', 'version','host','delay','delay_str','noexist','noexist_str')
    ordering = ('date',)

class rh_yc_admin(admin.ModelAdmin):
    list_display = ('citycode', 'date', 'version','host','delay','delay_str','noexist','noexist_str')
    ordering = ('date',)

class restart_admin(admin.ModelAdmin):
    list_display = ('citycode', 'date', 'version','program')
    ordering = ('date',)

class general_admin(admin.ModelAdmin):
    list_display = ('type', 'date', 'note','program','results')
    ordering = ('date',)

admin.site.register(city_manage,citymanage_admin)
admin.site.register(area_manage,areamanage_admin)
admin.site.register(gps_data,gpsdata_admin)

admin.site.register(fusion_yc,fusion_yc_admin)
admin.site.register(rh_yc,rh_yc_admin)
admin.site.register(restart,restart_admin)
admin.site.register(general,general_admin)